import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';

import { HomePage } from '../pages/home/home';
import { TabsPage } from '../pages/tabs/tabs';
import { TaskPage } from '../pages/task/task';
import { MinePage } from '../pages/mine/mine';
import { TestPage } from '../pages/test/test';

import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';

import { HttpClientModule } from '@angular/common/http';
import { BackButtonService } from "../providers/backButton.service";
import { HttpsService } from "../providers/http.service";
import { StorageService } from '../providers/storage.service';
import { UtilsService } from '../providers/utils.service';
import { WechatService } from '../providers/wechat.service';

import { ComponentsModule } from '../components/components.module';
import { ThemeableBrowser } from '@ionic-native/themeable-browser';

@NgModule({
  declarations: [
    MyApp,
    HomePage,
    TabsPage,
    MinePage,
    TaskPage,
    TestPage
  ],
  imports: [
    BrowserModule,
    HttpClientModule,
    ComponentsModule,
    // IonicModule.forRoot(MyApp)
    IonicModule.forRoot(MyApp, {
      tabsHideOnSubPages: 'true', //隐藏全部子页面tabs
      backButtonText:'back', //返回按钮文字
      iconMode: 'ios',//安卓icon强制使用ios的icon以及样式
      mode: 'ios',//样式强制使用ios样式
    })
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    HomePage,
    TabsPage,
    MinePage,
    TaskPage,
    TestPage
  ],
  providers: [
    StatusBar,
    SplashScreen,
    BackButtonService,
    HttpsService,
    StorageService,
    UtilsService,
    WechatService,
    ComponentsModule,
    {provide: ErrorHandler, useClass: IonicErrorHandler},
    ThemeableBrowser
  ]
})
export class AppModule {}
